<?php
/**
 * Created By kefu_virus_com
 * Author: Virus
 * Date: 2020/2/8
 * Time: 16:27
 */

namespace app\common\auto;

use think\facade\Env;
use think\facade\Request;

class SystemConst
{
    public function initialize()
    {
        // 定义 模块、控制器、方法
        define('MODULE_NAME', Request::module());
        define('CONTROLLER_NAME', Request::controller());
        define('ACTION_NAME', Request::action());

        define('ROOT_PATH', dirname(str_replace('\\', '/', $_SERVER['SCRIPT_FILENAME'])).'/');
        define('TEMPLATE_PATH', ROOT_PATH.'../template/');
    }
}